<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Blog extends CI_Controller {

    public function __construct()
    {
        parent::__construct();
        
		$this->load->library('form_validation');
		
		$this->load->model('post_m', 'post');
		$this->load->model('users/users_m', 'user');
		$this->load->model('admin/blog_categories_m', 'categories');
    }
    
	public function index()
	{
		$this->lists();
	}
	
	public function post($year = NULL, $month = NULL, $day = NULL, $url_title = NULL)
	{
		$post = $this->post->get_post_by_url($year, $month, $day, $url_title);
		
		echo $post->title;
		echo '<br/>Posted by: '.$post->user->username;
		echo '<br/>'.$post->content;
		echo '<br/>',$post->category->title;
	}
	
	public function lists($page = 0)
	{
		
	}
}